<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>更改 HTML 元素的内容为 JavaScript 变量的值</title>
</head>
<body>
<div id="change" class="change">
    <h1>{{ info }}</h1>
</div>
</body>
<script>
    let info = "Hello, World!"

    let element = document.querySelector("#change > h1");
    console.log(element);
    console.log(element.textContent);

    console.log(eval("info"));
    console.log(eval("{{ info }}"));
    console.log(eval(element.textContent));

    element.textContent = eval(element.textContent)

</script>
</html>